/*
 * @Description: 产量规格管理
 */
import zhreq from "@/api/axios";
export default {
  /**
   * @description: 获取种养品种 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   */
  getlist(params) {
    return zhreq.post("/v3/harvest/standard/queryPageByCondition", {
      ...params,
      order: 'asc',
      entity: {
        "farmingTypeNo": sessionStorage.getItem("farmingTypeNo"),
        "organizationNo": sessionStorage.getItem("organizationNo")
      }
    });
  },
  getlisttwo(params) {
    return zhreq.post("/v3/harvest/standard/queryPageByCondition", {
      ...params
    });
  },
  /**
   * @description:模糊查询产量规格名称-表格列表 *代表必填
   */
  getqueryList(params) {
    return zhreq.post("/v3/harvest/standard/queryByCondition", {
      specificationName: params
    });
  },
  /**
   * @description: 添加
   * @param {Object}  *
   */
  addlist(params) {
    return zhreq.post('/v3/harvest/standard/add',
      {
        ...params,
        "farmingTypeNo": sessionStorage.getItem("farmingTypeNo"),
        // "organizationNo":  sessionStorage.getItem("parentId") || sessionStorage.getItem("organizationNo")
        "organizationNo": sessionStorage.getItem("organizationNo")
      });
  },
  /**
   * @description: 删除
   * @param {Object}  *
   */
  dellist(params) {
    return zhreq.post('/v3/harvest/standard/delListByNo', {
      'noList': params
    });
  },
  /**
   * @description: 修改
   * @param {Object}  *
   */
  editlist(params) {
    return zhreq.post('/v3/harvest/standard/edit', params);
  },
  /**
   * @description: 条件查询
   * @param {Object}  *
   */
  querybycondition(params) {
    return zhreq.post('/v3/harvest/standard/queryByCondition', {
      ...params
    });
  }
};
